package com.feidee.bigdata.controller;

import com.feidee.bigdata.dao.StorageDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigInteger;

/**
 * @Author:CHQ
 * @Date:2020/5/11 19:03
 * @Description
 */
@RestController
public class StorageController {
    @Autowired
    private StorageDao storageDao;

    @RequestMapping("/storage/decrease")
    public void decrease(@RequestParam(value = "productId") Long productId,
                         @RequestParam(value = "count") Long count) {
        storageDao.decrease(productId, count);
    }
}
